home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 24 / AMIGAplus Sonderheft 24 (2000)(Falke)(DE)[!].iso / PublicDomain / Anwendungen / MT-RechnungIII / PrintDoks / ArtikelüberGruppen.artpri < prev    next >
Text File  |  1999-03-27  |  5KB  |  263 lines

  1. 2$VER: ArtikelüberGruppen 1.01 (28.03.99)
  2. %!PS-Adobe-3.0
  3. %%Creator: Manfred Tremmel
  4. %%CreationDate: (28.03.1999)
  5. %%Version: 1.01
  6. %%Title: (MT-RechnungIII - Artikelübersicht nach Artikelgruppen)
  7. %%LanguageLevel: 2
  8. %%DocumentMedia: A4 594 839 null () ()
  9. %%DocumentNeededResources: font Times-Roman
  10. %%BoundingBox: 0 0 549 839
  11. %%EndComments
  12. %%BeginnDefaults
  13. %%PageMedia: A4
  14. %%EndDefaults
  15.  
  16. %%BeginnSetup
  17. << /PageSize [594 839] >> setpagedevice
  18.  
  19. /PageSize [594 839] def
  20.  
  21. /DokumentRandX 54 def
  22. /DokumentRandY 50 def
  23.  
  24. DruckrandX 720 mul 256 div /DruckrandX exch def
  25. DruckrandY 720 mul 256 div /DruckrandY exch def
  26.  
  27. DruckrandX DokumentRandX ge
  28. {
  29.     0 /DokumentRandX exch def
  30. }
  31. {
  32.     DokumentRandX DruckrandX sub /DokumentRandX exch def
  33. } ifelse
  34.  
  35. DruckrandY DokumentRandY ge
  36. {
  37.     PageSize 1 get /DokumentRandY exch def
  38. }
  39. {
  40.     PageSize 1 get DokumentRandY sub DruckrandY add /DokumentRandY exch def
  41. } ifelse
  42.  
  43. /DokumentRandYOriginal DokumentRandY def
  44. %%EndSetup
  45.  
  46. %%BeginnResource
  47. /reencodedict 5 dict def
  48. /ReEncode
  49. {
  50.      reencodedict begin
  51.      /newencoding exch def
  52.      /newfontname exch def
  53.      /basefontname exch def
  54.  
  55.      /basefontdict basefontname findfont def
  56.  
  57.      /newfont basefontdict maxlength dict def
  58.  
  59.      basefontdict
  60.      { exch dup dup /FID ne exch /Encoding ne and
  61.           { exch newfont 3 1 roll put }
  62.           { pop pop }
  63.           ifelse
  64.      } forall
  65.      newfont /FontName newfontname put
  66.      newfont /Encoding newencoding put
  67.      newfontname newfont definefont pop
  68.      end
  69. } def
  70.  
  71. /ISOLatin8Encoding
  72. [
  73.     ISOLatin1Encoding 0 164 getinterval aload pop
  74.     /euro
  75.     ISOLatin1Encoding 165 91 getinterval aload pop
  76. ] def
  77. /getfont {ISOLatin8Encoding ReEncode findfont exch scalefont def} bind def
  78. /getsymbol {findfont exch scalefont def} bind def
  79. %%EndResource
  80.  
  81. %% Fontpsoidoname, Fontgroesse, Realname, Programm (siehe oben)
  82. /Times10Zeile 10 def
  83. /Times10 Times10Zeile /OF0 /Times-Roman /OF0 getfont
  84. /Times24Zeile 24 def
  85. /Times24 Times24Zeile /OF0 /Times-Roman /OF0 getfont
  86.  
  87. /Seite 1 def
  88. /SeitenNr 4 string def
  89.  
  90. %% Definition der Überschrift
  91. /Ueberschrift
  92. {
  93.     /BoxX1 DokumentRandX def
  94.     /BoxX2 486 def
  95.     /BoxY1 DokumentRandY 2 sub def
  96.     /BoxY2 Times10Zeile def
  97.  
  98.     0.9 setgray
  99.     BoxX1 BoxY1 BoxX2 BoxY2 rectfill
  100.     0.0 setgray
  101.     BoxX1 BoxY1 BoxX2 BoxY2 rectstroke
  102.  
  103.     DokumentRandX 3 add DokumentRandY moveto
  104.     (ArtikelNr) show
  105.  
  106.     DokumentRandX 50 add DokumentRandY moveto
  107.     (ArtikelNr2) show
  108.  
  109.     DokumentRandX 125 add DokumentRandY moveto
  110.     (Artikelbezeichnung) show
  111.  
  112.     DokumentRandX 325 add DokumentRandY moveto
  113.     (Einheit) show
  114.  
  115.     DokumentRandX DokumentRandY moveto
  116.     (MWSt) dup stringwidth
  117.     pop 400 exch sub
  118.     DokumentRandX add DokumentRandY moveto show
  119.  
  120.     DokumentRandX DokumentRandY moveto
  121.     (Einzelpreis) dup stringwidth
  122.     pop 480 exch sub
  123.     DokumentRandX add DokumentRandY moveto show
  124.  
  125.     DokumentRandY Times10Zeile sub 5 sub /DokumentRandY exch def
  126.  
  127. } def
  128.  
  129. /ArtikelGRPTab ArtikelTabelle length array def
  130. ArtikelGRPTab 0 () put
  131. /ArtikelGRPAnz 1 def
  132.  
  133. {
  134.     /GRPVGLWert (\377\377\377) def
  135.     ArtikelTabelle
  136.     {
  137.         51 get /ArtikelGRP exch def
  138.         ArtikelGRPTab ArtikelGRPAnz 1 sub get ArtikelGRP lt
  139.         ArtikelGRP GRPVGLWert lt and
  140.         {
  141.             /GRPVGLWert ArtikelGRP def
  142.         } if
  143.     } forall
  144.  
  145.     GRPVGLWert (\377\377\377) eq
  146.     {
  147.         exit
  148.     } if
  149.  
  150.     ArtikelGRPTab ArtikelGRPAnz GRPVGLWert put
  151.  
  152.     ArtikelGRPAnz 1 add /ArtikelGRPAnz exch def
  153. } loop
  154.  
  155.  
  156. %% Ausgabe der Kopfdaten
  157.  
  158. Times24 setfont
  159.  
  160. DokumentRandX DokumentRandY moveto
  161. (Artikelübersicht nach Artikelgruppen) dup stringwidth pop
  162. PageSize 0 get exch sub 2 div cvi DokumentRandY moveto show
  163.  
  164. DokumentRandY Times24Zeile sub Times24Zeile sub /DokumentRandY exch def
  165.  
  166. Times10 setfont
  167.  
  168. Ueberschrift
  169.  
  170. /ArtikelGRPPos 0 def
  171.  
  172. ArtikelGRPAnz
  173. {
  174.     ArtikelGRPTab ArtikelGRPPos get () ne
  175.     {
  176.         70 Times10Zeile 3 mul cvi add DokumentRandY gt
  177.         {
  178.             DokumentRandX 450 add 50 moveto
  179.             (Seite: ) show
  180.             Seite SeitenNr cvs show
  181.             showpage
  182.  
  183.             /DokumentRandY DokumentRandYOriginal def
  184.             Ueberschrift
  185.             Seite 1 add /Seite exch def
  186.         } if
  187.         
  188.         DokumentRandY Times10Zeile sub /DokumentRandY exch def
  189.         DokumentRandX 3 add DokumentRandY moveto
  190.         (Artikelgruppe: ) show
  191.         ArtikelGRPTab ArtikelGRPPos get show
  192.         DokumentRandY Times10Zeile sub /DokumentRandY exch def
  193.  
  194.     } if
  195.  
  196.     ArtikelTabelle
  197.     {
  198.         dup 51 get ArtikelGRPTab ArtikelGRPPos get eq
  199.         {
  200.             70 DokumentRandY gt
  201.             {
  202.                 DokumentRandX 450 add 50 moveto
  203.                 (Seite: ) show
  204.                 Seite SeitenNr cvs show
  205.                 showpage
  206.  
  207.                 /DokumentRandY DokumentRandYOriginal def
  208.                 Ueberschrift
  209.                 Seite 1 add /Seite exch def
  210.             } if
  211.  
  212.             dup 0 get
  213.             DokumentRandX 3 add DokumentRandY moveto
  214.             show
  215.  
  216.             dup 1 get
  217.             DokumentRandX 50 add DokumentRandY moveto
  218.             show
  219.  
  220.             dup 3 get
  221.             DokumentRandX 125 add DokumentRandY moveto
  222.             show
  223.  
  224.             dup 5 get
  225.             DokumentRandX 325 add DokumentRandY moveto
  226.             show
  227.  
  228.             dup 8 get
  229.             DokumentRandX DokumentRandY moveto
  230.             dup stringwidth
  231.             pop 400 exch sub
  232.             DokumentRandX add DokumentRandY moveto
  233.             show
  234.  
  235.             dup 26 get 0 get exch 23 get get
  236.             DokumentRandX DokumentRandY moveto
  237.             dup stringwidth
  238.             pop 480 exch sub
  239.             DokumentRandX add DokumentRandY moveto
  240.             show
  241.  
  242.             DokumentRandY Times10Zeile sub /DokumentRandY exch def
  243.         }
  244.         {
  245.             pop
  246.         } ifelse
  247.     } forall
  248.  
  249.     ArtikelGRPPos 1 add /ArtikelGRPPos exch def
  250.  
  251. } repeat
  252.  
  253. DokumentRandX 450 add 50 moveto
  254. (Seite: ) show
  255. Seite SeitenNr cvs show
  256.  
  257. showpage
  258.  
  259. %%Trailer
  260. clear
  261. %%EOF
  262.  
  263.